const dayjs = require('dayjs')

const publicUtils = {}
publicUtils.install = function (Vue) {
  // XXXXX-XXXXX-XXXXX-XXXXX-XXXXX 格式GUID生成
  function _guid() {
    function N() {
      return ((Math.random() * 0x1000000) | 0).toString(16).toLocaleUpperCase().substring(0, 5)
    }
    return `${N()}-${N()}-${N()}-${N()}-${N()}`
  }

  Vue.prototype.$guid = _guid
  Vue.prototype.$dayjs = dayjs
}
export default publicUtils
